package com.yanmaohu.yulia.statement;

import com.yanmaohu.yulia.bean.*;

/**
 * @author Bright Lee
 */
public final class DomainDefinition implements SchemaElement, SqlSchemaDefinitionStatement, Statement {

    private int beginIndex;
    private int endIndex;
    private SchemaQualifiedName domainName;
    private DataType dataType;
    private DefaultClause defaultClause;
    private DomainConstraintList domainConstraintList;
    private CollateClause collateClause;

    public DomainDefinition(int beginIndex,
                            int endIndex,
                            SchemaQualifiedName domainName,
                            DataType dataType,
                            DefaultClause defaultClause,
                            DomainConstraintList domainConstraintList,
                            CollateClause collateClause) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.domainName = domainName;
        this.dataType = dataType;
        this.defaultClause = defaultClause;
        this.domainConstraintList = domainConstraintList;
        this.collateClause = collateClause;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public SchemaQualifiedName getDomainName() {
        return domainName;
    }

    public DataType getDataType() {
        return dataType;
    }

    public DefaultClause getDefaultClause() {
        return defaultClause;
    }

    public DomainConstraintList getDomainConstraintList() {
        return domainConstraintList;
    }

    public CollateClause getCollateClause() {
        return collateClause;
    }

}
